package com.abo.yaas;

import java.util.Locale;

import com.abo.yaas.authentication.SessionHandler;
import com.abo.yaas.i18n.Lang;
import com.abo.yaas.view.ViewHandler;
import com.abo.yaas.view.widgets.MainLayout;
import com.abo.yaas.webservice.ResourceProvider;
import com.vaadin.Application;
import com.vaadin.ui.Window;

@SuppressWarnings({ "serial" })
public class YaasApplication extends Application {
    @Override
    public void init() {
        setTheme("yaas_reindeer");

        SessionHandler.initialize(this);
        ViewHandler.initialize(this);
        ResourceProvider.initialize(this);

        Lang.initialize(this);

        setMainWindow(new Window("Yet Another Auction Site"));

        final MainLayout mainLayout = new MainLayout();
        ViewHandler.addView(mainLayout);
        getMainWindow().setContent(mainLayout);
        Lang.setLocale(new Locale("en"));
    }

}
